﻿using Lhz.Sc.Business;
using Lhz.Sc.Entity.Database;
using Lhz.Test.Common;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Linq;

namespace Lhz.Sc.Test.LhzScBusiness
{
    [TestClass]
    public class UnitTestService
    {
        private ApplicationProxy ao = new ApplicationProxy();

        [TestMethod]
        public void ServiceProxyTestMethodCommon()
        {
            var application = ao.Query().First();
            var service = TestEntityBuilder.BuildService(application);
            var dbt = new ProxyCrudTester<Guid, Service>();
            var changes = new Dictionary<string, object>();
            changes.Add("No", "No");
            changes.Add("Name", "Name");
            changes.Add("Url", "Url");
            changes.Add("Description", "Description");
            dbt.CrudTest(service, service.Guid, changes, new string[] { "Application", "Operations" });
        }
    }
}
